package com.muyan.netty.nettysocket;

import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
 * 使用netty5 演示 nio socket
 */
public class Start {

    public static void main(String[] args) {
        MultiChannelClient client = new MultiChannelClient();
        client.init(5);

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        while (true) {
            try {
                System.out.println("请输入：");
                String msg = reader.readLine();
                client.nextChannel().writeAndFlush(msg);
            } catch (Exception ignore) {

            }
        }

    }

}
